#include "Crosshair.h"

#include "../SGD Wrappers/SGD_GraphicsManager.h"
#include "../SGD Wrappers/SGD_InputManager.h"
//#include "../SGD Wrappers/SGD_GraphicsManager.h"

Crosshair::Crosshair()
{
}


Crosshair::~Crosshair()
{
}
void Crosshair::Update(float dt)
{
	m_ptPosition = SGD::InputManager::GetInstance()->GetMousePosition();
}

void Crosshair::Render(void)
{
	SGD::GraphicsManager* pGraphics = SGD::GraphicsManager::GetInstance();

	SGD::Rectangle crosshair = SGD::Rectangle{0, 0, 167, 167};

	pGraphics->DrawTextureSection(
		m_hImage, {
		(m_ptPosition.x - GetSize().width/8), 
		(m_ptPosition.y - GetSize().height/8)}, 
		crosshair, 
		0, {}, {}, SGD::Size {0.25f, 0.25f}
		);

}